import service from '@/utils/request'
const BASE_URL = 'api-course'

// 获取教室列表
export function classroomList(data) {
    return service({
        url: `${BASE_URL}/class-rooms`,
        method: 'get',
        params: data
    })
}

// 新增教室
export function addClassroom(data) {
    return service({
        url: `${BASE_URL}/class-room`,
        method: 'post',
        data
    })
}

// 新增教室
export function editClassroom(data) {
    return service({
        url: `${BASE_URL}/class-room`,
        method: 'put',
        data
    })
}

// 删除教室
export function deleteClassroom(roomId) {
    return service({
        url: `${BASE_URL}/class-room/${roomId}`,
        method: 'delete'
    })
}

//启用/停用
export function enableClassRoom(roomId) {
    return service({
        url: `${BASE_URL}/class-room/enable/${roomId}`,
        method: 'put',
    })
}